package com.handpay.zztong.hp;

import android.content.Intent;
import android.os.Bundle;
import android.widget.ImageView;
import android.widget.TextView;

import com.handpay.framework.utils.CommonUtils;
import com.handpay.zztong.hp.base.activity.ZZTongActivity;
import com.handpay.zztong.hp.bean.ActionBar;
import com.handpay.zztong.hp.protocol.AQProtocolConstant;
import com.handpay.zztong.hp.utils.BankUtils;

/**
 * 余额查询结果
 * 
 * @author ppliu
 * 
 */
public class BalanceEnquiry extends ZZTongActivity {
	
	
	@Override
	protected boolean isShownTabs()
	{	
		return false;
	}
	@Override
	public ActionBar getActivityActionBar() {
		return new ActionBar(this.getString(R.string.balanceenquiry_title), true);
	}
	/**
	 * 余额查询结果中的余额key
	 */

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		this.setContentView(R.layout.balance_inquiry);
		super.onCreate(savedInstanceState);

		final Intent intent = getIntent();
		Bundle bundle = intent.getExtras();
		
		
		
		((TextView) findViewById(R.id.balanceTextView)).setText(CommonUtils
				.formatMoney(bundle.getDouble(AQProtocolConstant.OUT_BALANCE)/100));
		((TextView) findViewById(R.id.cardNoTextView)).setText(CommonUtils.formattingCard_4(bundle.getString(AQProtocolConstant.OUT_CARD_NO)));
		String bankName = bundle.getString(AQProtocolConstant.OUT_BANKNAME);
		((TextView) findViewById(R.id.bank_name)).setText(bankName);
		((ImageView) findViewById(R.id.bank_logo)).setImageResource(BankUtils.getBankIcon(bankName));
		((TextView) findViewById(R.id.single_debit_card_limit)).setText(bundle
				.getString(AQProtocolConstant.OUT_BANKTYPE));
	}
	
	@Override
	public void onSwiperPlugOff()
	{
		// 回到HPFunction界面
		onFunctionTab(null);
	}
}
